package com.imooc.order.message;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @Name com.imooc.order.message.MqReceiver
 * @Description
 * @Author Elwyn
 * @Version 2020/3/19
 * @Copyright 上海云辰信息科技有限公司
 **/
@Slf4j
@Component
public class MqReceiver {
	//1@RabbitListener(queues = "myQueue")
	//2自动创建
	@RabbitListener(queuesToDeclare = @Queue("queue"))
	public void process(String message) {
		log.info("MqReceiver: {}",message);
	}
}
